﻿using System;

namespace Home.Haushalt
{
    /// <summary>
    /// 
    /// </summary>
    public class HEventArgs : EventArgs
    {
        /// <summary></summary>
        public string Action { get; private set; }

        /// <summary></summary>
        public int ProcessMax { get; private set; }

        /// <summary></summary>
        public int ProcessIndex { get; private set; }

        /// <summary></summary>
        public object Tag { get; private set; }

        /// <summary></summary>
        public Exception Exception { get; private set; }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="action"></param>
        public HEventArgs(string action) : this(action, null, -1, -1) { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="exception"></param>
        public HEventArgs(Exception exception) : this("", null, -1, -1) { Exception = exception; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="action"></param>
        /// <param name="processIndex"></param>
        /// <param name="processMax"></param>
        public HEventArgs(string action, int processIndex, int processMax) : this(action, null, processIndex, processMax) { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="action"></param>
        /// <param name="tag"></param>
        public HEventArgs(string action, object tag) : this(action, tag, -1, -1) { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="action"></param>
        /// <param name="tag"></param>
        /// <param name="processIndex"></param>
        /// <param name="processMax"></param>
        public HEventArgs(string action, object tag, int processIndex, int processMax)
        {
            Action = action;
            Tag = tag;
            ProcessIndex = processIndex;
            ProcessMax = processMax;
        }
    }
}
